package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 员工排位名称
 * </p>
 *
 * @author hpiggy
 * @since 2023-05-16
 */
@Data
@TableName("staff_ranking")
@ApiModel(value = "StaffRanking对象", description = "员工排位名称")
public class StaffRanking implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("排位名称")
    private String name;

    @ApiModelProperty("排位日期")
    private LocalDate rankingDate;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("排序号")
    private Integer sort;

    @ApiModelProperty("是否删除1：是 ，0：否")
    @TableLogic(value = "0", delval = "1")
    @TableField(select = false)
    private Integer deleted;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill =FieldFill.INSERT,select = false)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.UPDATE,select = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    @TableField(fill = FieldFill.DEFAULT,select = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String deletedAt;

    @TableField(exist = false)
    @ApiModelProperty("年份")
    private Integer year;

}
